"use strict";!function(){window.Traqli.registerWidget("_embedded",function(e,t,i){function o(t,i){e.call(this,t,i),this.embedded=!0;var o=this;o.addHookHandler("preShowInnerForm",function(){o.__$form.css({display:"block",height:0})})}var r=i.$();return t(o,e),o.prototype.getMyName=function(){return"Embedded "+e.prototype.getMyName.apply(this,arguments)},o.prototype.__canDisplayOnOutAfterClose=function(){return!1},o.prototype.__getFormPlacement=function(){var e=this.config.behavior.placeholder_name,t=r('tqwgtplaceholder[holdername="'+e+'"]');if(!t.length)return i.loge(this.__me()+"::__getFormPlacement",this.config.id,"placeholder is not found. Placeholder:",e),null;var o=r("");return i.copyAttributes(t,o),t.replaceWith(o),o},o.prototype.__getFormStyles=function(){return{form:{width:this.config.view.responsive?"100%":this.config.view.width,display:"none",overflow:"hidden",opacity:0},iframe:{border:"none",margin:"0px",padding:"0px",display:"block",width:this.config.view.responsive?"100%":this.config.view.width,height:0}}},o.prototype.__prepareConfig=function(){if(!1===e.prototype.__prepareConfig.apply(this,arguments))return!1;var t=this.config.behavior,o=this.config.view;return"width"in o?"placeholder_name"in t?void 0:(i.loge(this.__me()+"::__prepareConfig:","behavior.placeholder_name is not specified -",i.stringify(t.placeholder_name)),!1):(i.loge(this.__me()+"::__prepareConfig:","view.width is not specified -",i.stringify(o.width)),!1)},o.prototype.__runOuterHideAnimation=function(e,t){var i=this,o=Number(e.duration)||0;switch(e.type){case"slide-up":i.__$form.animate({height:0},o,function(){i.__$form.hide(),t()});break;case"fade-out":default:i.__$form.animate({opacity:0},o,function(){i.__$form.hide(),t()})}},o.prototype.__runOuterShowAnimation=function(e,t){var o=this,n=Number(e.duration)||0;switch(e.type){case"slide-down":e.formHeight&&r(o.__iframe).height(e.formHeight),o.__$form.css("opacity",1).animate({height:e.formHeight||1},n,function(){o.__$form.height("auto"),o.__attachIframeResizer()||i.loge(o.__me()+"::__runOuterShowAnimation for:",e,"with: IframeResizer was not attached"),t()});break;case"fade-in":default:if(!o.__attachIframeResizer())return i.reject(new Error("IframeResizer was not attached"));o.__$form.css("opacity",0).height("auto").animate({opacity:1},n,t)}},o})}();